<template>
  <div class="contain">
    <!--<div class="header">-->
      <!--<el-button type="primary" @click="addCard()">批量导出</el-button>-->
    <!--</div>-->
    <div class="table-content">
      <table-list ref="tableList" :tableConfig='configList' @selectTable="selectTable">
        <!--<el-table-column slot="content"  align="center" label="公告内容">-->
            <!--<template slot-scope="scope">-->
                <!--<div v-html="scope.row.mobile">{{scope.row.content}}</div>-->
            <!--</template>-->
        <!--</el-table-column>-->
        <el-table-column class="btn"  width="240px" label="操作" slot="btn" align="center" >
          <template slot-scope="scope">
            <el-button  @click="$router.push('/operationDetail?id='+scope.row.id)" type="primary" size="small">查看</el-button>
          </template>
        </el-table-column>
      </table-list>
    </div>

  </div>
</template>
<script>
  let CONSTANT = require("../../constant/constant.js");
  let common = require("../../common.js");
  export default{
    data(){
      return {
        categoryId:'',
        isSale:'',
        coverImage:[],
        searchName:'',
        pageCount:null,
        pageIndex:1,
        pageSize:10,
        informList:[],
        allThemeList:[],
        themeList:[],
        configList:{
          url:CONSTANT.URL.OPSLOG.FINDPAGE,
          configList:[
            {
              label:'操作描述',
              prop:'title',
            },
            {
              label:'操作人',
              prop:'userName',
            },
            {
              label:'操作时间',
              prop:'gmtCreated',
            },
            {
              slot:'btn'
            }
          ],
          param:{
            titleLike: ""
          },
          type:'',
          width:'',
          isSelect:true,
          isPagination:true
        },
      }
    },
    components: {
      'table-list':() => import('../common/my-table')
    },
    mounted() {
    },
    methods: {
      getList(){
        this.$refs.tableList.getList()
      },
      selectTable() {

      },
      //删除
      deleteItem(id){
        this.$confirm('确定删除?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          let  url = CONSTANT.URL.INFROMATIONMANAGE.DELETEINFOBYID;
          let data = {id:id} ;
          common.requestAjax(url,data,null,(res)=>{
            if(res.status == 200){
              this.$message({
                type:'success',
                message:'删除成功!'
              });
              this.getinformList();
            }
            else{
              this.$message({
                type:'warning',
                message:res.msg
              })
            }
          })
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消删除'
          });
        });
      },
      //新增编辑
      addCard(id){
        this.$router.push({path:'/informationDetail',query:{'id':id}});
      },
    },
  }
</script>

<style lang="scss">
  .contain {
    .el-dialog__body{ padding-left: 0;padding-top: 30px;border-top:1px solid #dedede;}
    .dialog-con{
      background-color: #f5f5f5;
      display: flex;
      justify-content: space-between;
      ul{
        width:28%;list-style: none;padding:0;font-size:14px;float: left;margin-top:0;z-index:999;
        li{ list-style: none;height:60px;line-height:60px;text-align: center;display: block;}
        li.active{color:#21b5cc;background-color: #fff;font-size:16px;border-right:2px solid #21b5cc;}
        //   li:hover{font-size:16px; }
      }
      .tab-content{ width: 70%;display: inline-block;padding-left:10%;background-color: #fff;min-height:300px;
        .sort{
          .sort_name{ font-weight: 600;margin-bottom: 5px;}
          .group-list{ padding-left: 20px;
            .el-radio{display:block;margin-left: 0;margin-bottom: 3px;}
          }
        }
      }
      .el-button--default{background-color: #fff !important;}
    }
  }
</style>
